<?php
/**
 * 入参校验类
 * 如果对应的方法不存在，默认不校验
 */

namespace App\Http\Validates\Backend;

class LoginValidate
{
    // 发送邮件
    static public function postEmail()
    {
        return [
            'email' => 'required|email',
            'scene_type' => 'required|integer|between:1,2'
        ];
    }

    // 注册
    static public function registerPost()
    {
        return [
            'email' => 'required|email',
            'password' => 'required|string|confirmed',
            'password_confirmation' => 'required|string',
            'email_code' => 'required|string|size:6',
            'clicaptcha_code' => 'required|string'
        ];
    }

    // 登录
    static public function loginPost()
    {
        return [
            'email' => 'required|email',
            'password' => 'required|string'
        ];
    }

    // 忘记密码
    static public function forgetPost()
    {
        return [
            'email' => 'required|email',
            'password' => 'required|string|confirmed',
            'password_confirmation' => 'required|string',
            'email_code' => 'required|string|size:6',
            'clicaptcha_code' => 'required|string'
        ];
    }
}
